package Day16;

import java.io.*;

public class Demo12 {
    public static void main(String[] args) throws IOException {
        //打印流
//        PrintStream ps = new PrintStream("C:\\Users\\刘娟\\Desktop\\aa.txt");
//        ps.println("锄禾日当午，汗滴禾下土");
//        ps.close();

//        FileOutputStream fos = new FileOutputStream("C:\\Users\\刘娟\\Desktop\\aa.txt");//字节输出流
//        PrintWriter pw = new PrintWriter(fos);//字符流输出流
//        pw.println("我欲迎风再留住几步");
//        pw.flush();
//        pw.close();

        //缓存流，将字符输入流，转换成可以一次读取一行的缓存字符读取流
        FileReader fr = new FileReader("C:\\Users\\刘娟\\Desktop\\aa.txt");
        BufferedReader br = new BufferedReader(fr);
        String s = br.readLine();
        System.out.println(s);

    }
}
